package com.ricchieri.common;

import java.util.Collection;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import com.ricchieri.model.User;

public class CustomAuthenticationToken extends UsernamePasswordAuthenticationToken {

	private static final long serialVersionUID = 5564223178076712069L;
	private User user;
	
	public CustomAuthenticationToken(String name, Object credentials,
			Collection<GrantedAuthority> authorities, User user) {
		super(name, credentials, authorities);
		this.user = user;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
}
